package com.kingtop.base.model;

import org.kingtop.model.IAuthorityPO;
import org.kingtop.mybatis.kengen.KeyGeneratorEnum;
import org.kingtop.mybatis.persistence.Column;
import org.kingtop.mybatis.persistence.Id;
import org.kingtop.mybatis.persistence.Table;

/**
 * 权限表
 * 
 * @author Administrator
 * @version 1.0
 * @created 2017-12-17 22:10:58
 */
@Table(name = "T_BASE_AUTHORITY")
public class BaseAuthority implements IAuthorityPO {

    /**
     * 
     */
    private static final long serialVersionUID = 1972609692667610467L;

    @Id(key = KeyGeneratorEnum.SNOWFLAKE_KEY) // 标识为主键,key可以不写
    @Column(name = "ID", order = true) // 标识为数据库字段;如果列明是按驼峰规则生成，可以不加name部分
	/**@SequenceGenerator(name = "BASE_AUTHORITY_ID_SEQU") // 如果是oracle数据库，@Id的key为KeyGeneratorEnum.JDBC3_KEY，且sequence不是根据规则来创建，则需要加这个注解
    @RedisGenerator(keyName="test") // 如果@Id的key为KeyGeneratorEnum.REDIS_KEY，还想为表自定义自增key，可以添加这个注解，不添加的话，默认使用共用的key**/
    private Long id;

    /**
     * 权限名称
     */
    @Column(name = "NAME")
    private String name;

    /**
     * 系统中验证时使用的权限标识
     */
    @Column(name = "AUTHORITY_SIGN")
    private String authoritySign;

    /**
     * 是否可用，1：可用2：不可用
     */
    @Column(name = "STATUS")
    private Integer status;

    /**
     * 备注
     */
    @Column(name = "REMARK")
    private String remark;

    /**
     * 父ID
     */
    @Column(name = "PARENT_ID")
    private Long parentId;

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "BaseAuthority [id=" + id + ", name=" + name + ", authoritySign=" + authoritySign
                + ", status=" + status + ", remark=" + remark + ", parentId=" + parentId + "]";
    }

    public BaseAuthority() {

    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return this.id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getParentId() {
        return this.parentId;
    }

    @Override
    public String getAuthoritySign() {
        return this.authoritySign;
    }

    /**
     * @param authoritySign the authoritySign to set
     */
    public void setAuthoritySign(String authoritySign) {
        this.authoritySign = authoritySign;
    }

	/**
	 * @return the status
	 */
	public Integer getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

}
